<?php

class Application_Model_DbTable_Chitietphieunhap extends Zend_Db_Table_Abstract
{
    /* Tên bảng : Chitietsanpham
     * Tên bảng thực csdl : tbl_chi_tiet_phieu_nhap
     * Khóa chính : none
     * Ràng buộc tham chiếu : Application_Model_DbTable_Phieunhap , Application_Model_DbTable_Nhacungcap , Application_Model_DbTable_Sanpham
     * */
    protected $_name = 'tbl_chi_tiet_phieu_nhap';
    protected $_referenceMap = array(
            'phieunhap'=> array(
                'columns' => 'ma_phieu_nhap',
                'refTableClass' => 'Application_Model_DbTable_Phieunhap',
                'refColumns' => 'ma_phieu_nhap',
                'onDelete' => self::CASCADE,
                'onUpdate' => self::RESTRICT
            ),
            'nhacungcap'=>array(
                'columns'=>'ma_ncc',
                'refTableClass' => 'Application_Model_DbTable_Nhacungcap',
                'refColumns' => 'id_ncc',
                'onDelete' => self::CASCADE,
                'onUpdate' => self::RESTRICT
            ),
            'sanpham' => array(
                'columns'=>'ma_hang_hoa',
                'refTableClass' => 'Application_Model_DbTable_Sanpham',
                'refColumns' => 'id',
                'onDelete' => self::CASCADE,
                'onUpdate' => self::RESTRICT
            )
    );

}

